<meta charset="utf-8">
<section>
	<div class="container">
		<ol class="breadcrumb">
			<li><a href="#"><i class="fa fa-angel-right"></i> Proyectos</a></li>
			<li class="active"><i class="fa fa-angel-right"></i> Listado de
				proyectos</li>
		</ol>
		<div class="pull-left">
			<div class="form-group">
				<button type="button" class="btn btn-primary"  ng-click="createNewProject()">
					<i class="fa fa-plus-circle"></i> Nuevo proyecto
				</button>
			</div>
		</div>
		<div class="pull-right form-inline" ng-hide="advancedSearch">
			<div class="form-group">
				<label for="exampleInputEmail1">Buscar por ID de proyecto</label> 
				<input type="text" class="form-control" placeholder="ID de proyecto" ng-model="projectNumber">
			</div>
			<div class="form-group">
				<button type="button" class="btn btn-primary" ng-click="searchproject()">
					<i class="fa fa-search"></i> Buscar
				</button>
			</div>
			<div class="form-group" style="display:none;">
				<button type="button" class="btn btn-default" ng-click="toggleAdvancedSearch()">
					<i class="fa fa-search"></i> Busqueda avanzada
				</button>
			</div>
		</div>
	</div>

	<!-- BUSQUEDA AVANZADA -->
	<div class="container" ng-show="advancedSearch">
		<div class="pull-left form-inline">
			<div class="form-group">
				<input type="email" class="form-control" placeholder="Buscar por...">
			</div>
			<div class="form-group">
				<div class="dropdown">
					<a id="" type="button" data-toggle="dropdown"> Título <i
						class="fa fa-chevron-down"></i>
					</a>
					<ul class="dropdown-menu">
						<li><a href="#">Nuevo</a></li>
						<li><a href="#">Activo</a></li>
						<li><a href="#">Pendiente</a></li>
						<li><a href="#">Cancelado</a></li>
					</ul>
				</div>
			</div>
			<div class="form-group">
				<button type="button" class="btn btn-primary">
					<i class="fa fa-search"></i> Buscar
				</button>
			</div>
		</div>
		<div class="pull-right form-inline">
<!-- 			<div class="form-group"> -->
<!-- 				<button type="button" class="btn btn-primary"> -->
<!-- 					<i class="fa fa-print"></i> Imprimir -->
<!-- 				</button> -->
<!-- 			</div> -->
			<!-- esta opcion debe abrir modal -->
			<div class="form-group">
				<button type="button" class="btn btn-primary">
					<i class="fa fa-table"></i> Editar columnas
				</button>
			</div>
		</div>
	</div>
	<!-- end BUSQUEDA AVANZADA -->

	<div class="container">
		<div class="panel panel-default">
			<div class="panel-body">
				<table class="table table-hover table-condensed table-responsive table-product">
					<thead>
						<tr>
							<th>
								<a href="javascript:void(0);"> <!-- cambiar a fa-caret-up -->N° Proyecto 
<!-- 									<i class="fa fa-caret-down pull-right"></i> -->
								</a>
							</th>
							<th>
								<a href="javascript:void(0);"> <!-- cambiar a fa-caret-up -->Nombre del Emprendedor Titular 
<!-- 									<i class="fa fa-caret-down pull-right"></i> -->
								</a>
							</th>
							<th>
								<a href="javascript:void(0);"> <!-- cambiar a fa-caret-up -->DNI 
<!-- 									<i class="fa fa-caret-down pull-right"></i> -->
								</a>
							</th>
							<th>
								<a href="javascript:void(0);"> <!-- cambiar a fa-caret-up -->Título del Proyecto 
<!-- 									<i class="fa fa-caret-down pull-right"></i> -->
								</a>
							</th>
							<th class="txtC">Acciones</th>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="project in projects">
							<td>{{project.number}}</td>
							<td>{{getHolderNames(project)}}</td>
							<td>{{getHolderDocumentNumbers(project)}}</td>
							<td>{{project.title}}</td>
							<td class="txtC">
								<button type="button" class="btn btn-link" ng-click="goToDetail(project.id)">
									<i class="fa fa-pencil txtSuccess"></i>
								</button>
								<button type="button" class="btn btn-link" ng-click="goToReadonly(project.id)">
									<i class="fa fa-eye txtSuccess"></i>
								</button>								
								
								<!-- <button type="button" class="btn btn-link" ng-click="remove(project)">
									<i class="fa fa-trash txtDanger"></i>
								</button>-->
							</td>
						</tr>
					</tbody>
				</table>
				<nav>
					<inti-pagination items-per-page="pageQty" service-name="serviceName" on-success="onSucces(page)" search="searchproject" filter="projectNumber"></inti-pagination>
				</nav>
			</div>
		</div>
	</div>
</section>